home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -in_the_mag- / multitasking / priorities / setpri17 / setpri.doc < prev    next >
Text File  |  2000-03-05  |  3KB  |  96 lines

  1.  
  2.          SetPri V1.7  9 July 1994  Copyright Richard Waspe 1994
  3.  
  4.          Freely Distributable other than by Magazine Coverdisk
  5.  
  6.  
  7.  
  8.    SetPri is used to change the priority of any running task or
  9.    process, and needs WB2 or above. It differs from C:ChangeTaskPri,
  10.    in that it does not need to know the Process Number of the program
  11.    to change. It DOES need to be given the full name of the task to
  12.    change. SetPri does not allow you to change the priority outside
  13.    the range -50 to +19. This was written as a simple shell command
  14.    that does not need a GUI and can be used in scripts or from the
  15.    shell. The task or process to change can have been launched by any
  16.    means from a shell, the Workbench, Toolmanager, etc. It was
  17.    written for a friend who needed to lower the priority of a 3D
  18.    rendering process to be able to use the serial port without errors.
  19.  
  20.    USAGE :
  21.  
  22.    Although SetPri will run from the Workbench, it will only really
  23.    make sense to run it from the shell or a script. It takes the
  24.    ReadArgs template :
  25.  
  26.    NAME/A,PRIORITY/A/N,Q=QUIET/S
  27.  
  28.    NAME is the name of the running Task or Process to change. This
  29.    parameter is compulsory and must be an ascii string.
  30.  
  31.    PRIORITY is the new priority you wish to give the Task or Process.
  32.    It must be a number between -50 and +19. This limit is sensible
  33.    for normal use and will not allow you to block input.device. This
  34.    parameter is compulsory.
  35.  
  36.    Q=QUIET . Specifying Q or QUIET as the last parameter will stop
  37.    SetPri from issuing any messages. Useful for scripts. This
  38.    parameter is optional.
  39.  
  40.  
  41.    EXAMPLES :
  42.  
  43.    SetPri ARTM 3 Q
  44.  
  45.       Sets the priority of the Task ARTM (if running) to 3. No
  46.       messages are output.
  47.  
  48.    SetPri input.device 18
  49.  
  50.       Lowers the priority of the input.device from 20 to 18 and
  51.       reports what it has done to the shell.
  52.  
  53.    SetPri NAME Fred PRIORITY 12 QUIET
  54.  
  55.       Changes the priority of task Fred to 12 with no message
  56.       reporting. The Keywords are NOT compulsory.
  57.  
  58.  
  59.    RETURN CODES :
  60.  
  61.    0  :  All was OK, and the Task priority was changed
  62.    5  :  There was an error in the ReadArgs parameters
  63.    10 :  The requested priority was out of the range -50 to +19
  64.    20 :  The named task could not be found. Either it was not running
  65.          or you spelt it wrong.
  66.  
  67.  
  68.    COPYRIGHT :
  69.  
  70.    I retain full copyright over this program. It may be freely
  71.    distributed electronically or by reasonable cost PD floppy disks.
  72.    Magazines are specifically forbidden from publishing SetPri on any
  73.    coverdisk without my express written permission. Any magazine
  74.    failing to abide by this condition will be held in breach of
  75.    copyright.
  76.  
  77.    DISCLAIMER :
  78.  
  79.    Use this program at your own risk. I make no claims of it's
  80.    fitness for purpose and will not be held responsible for any loss,
  81.    damage or injury, consequential or otherwise, resulting from it's
  82.    use or distribution.
  83.  
  84.  
  85.    CREDITS :
  86.  
  87.    Many thanks to Eddy Carroll for the Task list searching code which
  88.    enabled CLI launched tasks to be found and is the heart of the
  89.    program.
  90.  
  91.    Richard Waspe
  92.  
  93.    waspy@cix.compulink.co.uk   (preferred)
  94.    rwaspe@hamlet.adsp.sub.org  (when working...)
  95.  
  96.